<!DOCTYPE html>
<html lang="en" xmlns:v-model="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>computed</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>

</head>
<body>
<div id="app">
    <introduce v-bind:title="title">{{title}}</introduce>
</div>
<script type="text/javascript">

    const introduce={
        template:"<h2>hello component{{title}}</h2>",
        data(){
            return {
                title:"introduce"
            }
        },
        props:["title"]

    }

    Vue.component("introduce",introduce);


    var app = new Vue({
        el: "#app",
        data: {
            title:"组件通讯内容msg"
        },
        // components:{
        //     counter:counter
        // }
    })
</script>
</body>
</html>